#ifndef _DT7_H_
#define _DT7_H_


#include "stm32f4xx_hal.h"

#define BSP_USART1_DMA_RX_BUF_LEN 30u

typedef __packed struct
{
	float RightX;
	float RightY;
	float LeftX;
	float LeftY;
	int8_t LeftSwitch;
	int8_t RightSwitch;
}Remote;

typedef __packed struct
{
	int16_t x;
	int16_t y;
	int16_t z;
	uint8_t last_press_l;
	uint8_t last_press_r;
	uint8_t press_l;
	uint8_t press_r;
}Mouse;	

typedef	__packed struct
{
	uint16_t v;
}Key;

typedef __packed enum
{
	RC_ON,
	RC_OFF
} RC_State;

typedef __packed enum
{
	RC_SWITCH_TOP = 1,
	RC_SWITCH_BOTTOM,
	RC_SWITCH_MIDDLE
} RC_Switch_State;

typedef struct
{
	Remote rc;
	Mouse mouse;
	Key key;
	RC_State state;
}RC_Ctl_t;



extern RC_Ctl_t RC_CtrlData;
void RC_DataHandle(uint8_t *pData);
void RemotreCtl_Data_Receive_Start(void);
void RemotreCtl_Data_Receive(void);



#endif
